var prefix = ctx + "admin/dict";

$(function() {
	var options = {
		url : prefix + "/page",
		updateUrl: prefix + "/goEditDict",
        removeUrl: prefix + "/{id}",
		sortName : "createTime",
		sortOrder : "desc",
		modalName : "字典类型",
		columns : [
				{
		            title: "序号",
		            formatter: function (value, row, index) {
		         	    return $.table.serialNumber(index);
		            }
		        },
				{
					field : 'description',
					sortable: true,
					title : '字典名称'
				},
				{
					field : 'type',
					sortable: true,
					title : '字典编码'
				},
				{
					field : 'systemFlag',
					title : '字典类型',
					formatter : function(value, row, index) {
						return $.table.selectDictLabel(datas, value);
					}
				},
				{
					field : 'createTime',
					sortable: true,
					title : '创建时间'
				},
				{
					title : '操作',
					align : 'center',
					formatter: function(value, row, index) {
		                var actions = [];
		                actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
		                actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="detail(\'' + row.id + '\')"><i class="fa fa-list-ul"></i>列表</a> ');
		                actions.push('<a class="btn btn-danger btn-xs ' + deleteFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
		                return actions.join('');
		            }
				} ]
	};
	$.table.init(options);
});

		/*字典列表-详细*/
function detail(dictId) {
	var url = prefix + '/detail/' + dictId;
	$.modal.openTab("字典数据", url);
}
		